package com.barry.pattern.singleton;

/**
 * @ClassName SingletonEh
 * @Description TODO
 * @Author wangxuexing
 * @Date 2020/2/17 15:40
 * @Version 1.0
 */
public class SingletonEh {
    private static SingletonEh singletonEh = new SingletonEh();

    private SingletonEh(){}

    public static SingletonEh getInstance(){
        return singletonEh;
    }

    public static void main(String[] args) {
        SingletonEh a = SingletonEh.getInstance();
        SingletonEh b = SingletonEh.getInstance();
        System.out.println((a==b));
    }
}
